import { lazy } from "react";
import {createBrowserRouter} from 'react-router-dom'
let Home=lazy(()=>import('../pages/home/Index'))
let Login=lazy(()=>import('../pages/login/Index'))
let MainLayout=lazy(()=>import('../pages/mainLayout/Index'))
let My=lazy(()=>import('../pages/my/Index'))
const routes=createBrowserRouter([
    {
        path:"/",
        element:<MainLayout></MainLayout>,
        children:[
            {
                path:'/home',
                element:<Home></Home>
            },

            {
                path:'/my',
                element:<My></My>
            },
            
        ]
    },
    {
        path:'/login',
        element:<Login></Login>
    }
])
export default routes